package com.itheima.job;

import com.itheima.service.SetmealService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 定时器类
 */
@Component
@JobHandler("clear.oss.job")
public class ClearOssPicJob extends IJobHandler {

    @Resource
    private SetmealService setmealService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        System.out.println("clear oss job...");
        setmealService.clearOssPic();

        return SUCCESS;
    }
}
